
#include "../ui.h"
#include "../app_includes.h"

#define ABOUT_TAB_NUM      (2)

static uint8_t tab_id = 0;
static lv_obj_t *ui_tabview;
static lv_obj_t *ui_tab[ABOUT_TAB_NUM];
static void about_tab0_screen_create(lv_obj_t *tab);
static void about_tab1_screen_create(lv_obj_t *tab);
static void about_click(lv_event_t *e);

void lv_about_close(void)
{
    uint16_t angle[] = {0, 90, 180, 270};
    lcd_154hsc04a_rotation(&board.lcd_dev, angle[ui_main_screen.dis_dir]);
    lv_status_bar_hidden(0);
}

//app应用入口
lv_obj_t *lv_about_open(lv_obj_t *screen)
{
    ui_tabview = lv_tab_screen_create(screen, ui_tab, ABOUT_TAB_NUM);
    about_tab0_screen_create(ui_tab[0]);
    about_tab1_screen_create(ui_tab[1]);
    about_group_select(0);
    lv_status_bar_hidden(1);
    return ui_tabview;
}

#define BTN_NUM     11

static lv_obj_t * ui_BtnGroup[BTN_NUM];
static lv_obj_t * ui_LabelPC;
static lv_obj_t * ui_Panel12;
static lv_obj_t * ui_Panel13;
static lv_obj_t * ui_Panel8;
static lv_obj_t * ui_Panel9;
static lv_obj_t * ui_Label25;
static lv_obj_t * ui_Label26;
static lv_obj_t * ui_Panel10;
static lv_obj_t * ui_Panel11;
static lv_obj_t * ui_Label27;
static lv_obj_t * ui_Label28;
static lv_obj_t * ui_Panel14;
static lv_obj_t * ui_TextTip;

void about_tab0_screen_create(lv_obj_t *tab)
{
    uint8_t i;
    
    for(i=0;i!=BTN_NUM;i++) {
        ui_BtnGroup[i] = lv_btn_create(tab);
        lv_obj_add_event_cb(ui_BtnGroup[i], about_click, LV_EVENT_FOCUSED, NULL);
    }
    
    ui_LabelPC = lv_label_create(tab);
    lv_obj_set_width(ui_LabelPC, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_LabelPC, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_LabelPC, 90);
    lv_obj_set_y(ui_LabelPC, -55);
    lv_obj_set_align(ui_LabelPC, LV_ALIGN_CENTER);
    lv_label_set_text(ui_LabelPC, " PC ");
    lv_obj_set_style_text_font(ui_LabelPC, &lv_font_montserrat_12, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui_LabelPC, 4, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_LabelPC, lv_color_hex(0x5F7C45), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_LabelPC, 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[7], 20);
    lv_obj_set_height(ui_BtnGroup[7], 40);
    lv_obj_set_x(ui_BtnGroup[7], -70);
    lv_obj_set_y(ui_BtnGroup[7], 0);
    lv_obj_set_align(ui_BtnGroup[7], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[7], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[7], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[7], 10, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[7], lv_color_hex(0x222622), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[7], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_BtnGroup[7], lv_color_hex(0xA69999), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_BtnGroup[7], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_BtnGroup[7], 2, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Panel12 = lv_obj_create(ui_BtnGroup[7]);
    lv_obj_set_width(ui_Panel12, 4);
    lv_obj_set_height(ui_Panel12, 26);
    lv_obj_set_align(ui_Panel12, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_Panel12, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    lv_obj_set_style_border_width(ui_Panel12, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[2], 20);
    lv_obj_set_height(ui_BtnGroup[2], 40);
    lv_obj_set_x(ui_BtnGroup[2], 70);
    lv_obj_set_y(ui_BtnGroup[2], 30);
    lv_obj_set_align(ui_BtnGroup[2], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[2], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[2], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[2], 10, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[2], lv_color_hex(0x222622), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[2], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_BtnGroup[2], lv_color_hex(0xA69999), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_BtnGroup[2], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_BtnGroup[2], 2, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Panel13 = lv_obj_create(ui_BtnGroup[2]);
    lv_obj_set_width(ui_Panel13, 4);
    lv_obj_set_height(ui_Panel13, 26);
    lv_obj_set_align(ui_Panel13, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_Panel13, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    lv_obj_set_style_border_width(ui_Panel13, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[6], 30);
    lv_obj_set_height(ui_BtnGroup[6], 60);
    lv_obj_set_x(ui_BtnGroup[6], -100);
    lv_obj_set_y(ui_BtnGroup[6], 0);
    lv_obj_set_align(ui_BtnGroup[6], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[6], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[6], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[6], 5, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[6], lv_color_hex(0x504E5F), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[6], 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Panel8 = lv_obj_create(ui_BtnGroup[6]);
    lv_obj_set_width(ui_Panel8, 12);
    lv_obj_set_height(ui_Panel8, 12);
    lv_obj_set_x(ui_Panel8, -3);
    lv_obj_set_y(ui_Panel8, -12);
    lv_obj_set_align(ui_Panel8, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_Panel8, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Panel8, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Panel8, lv_color_hex(0xFFFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Panel8, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_Panel8, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Panel9 = lv_obj_create(ui_BtnGroup[6]);
    lv_obj_set_width(ui_Panel9, 12);
    lv_obj_set_height(ui_Panel9, 12);
    lv_obj_set_x(ui_Panel9, -3);
    lv_obj_set_y(ui_Panel9, 12);
    lv_obj_set_align(ui_Panel9, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_Panel9, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Panel9, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Panel9, lv_color_hex(0xFFFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Panel9, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_Panel9, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Label25 = lv_label_create(ui_BtnGroup[6]);
    lv_obj_set_width(ui_Label25, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Label25, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Label25, 10);
    lv_obj_set_y(ui_Label25, -12);
    lv_obj_set_align(ui_Label25, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Label25, "-");
    lv_obj_set_style_text_font(ui_Label25, &lv_font_montserrat_12, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Label26 = lv_label_create(ui_BtnGroup[6]);
    lv_obj_set_width(ui_Label26, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Label26, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Label26, 10);
    lv_obj_set_y(ui_Label26, 12);
    lv_obj_set_align(ui_Label26, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Label26, "+");
    lv_obj_set_style_text_font(ui_Label26, &lv_font_montserrat_12, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[9], 60);
    lv_obj_set_height(ui_BtnGroup[9], 25);
    lv_obj_set_x(ui_BtnGroup[9], -35);
    lv_obj_set_y(ui_BtnGroup[9], -90);
    lv_obj_set_align(ui_BtnGroup[9], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[9], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[9], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[9], 5, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[9], lv_color_hex(0xCBEFC6), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[9], 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[10], 60);
    lv_obj_set_height(ui_BtnGroup[10], 25);
    lv_obj_set_x(ui_BtnGroup[10], 35);
    lv_obj_set_y(ui_BtnGroup[10], -90);
    lv_obj_set_align(ui_BtnGroup[10], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[10], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[10], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[10], 5, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[10], lv_color_hex(0xCBEFC6), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[10], 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[1], 30);
    lv_obj_set_height(ui_BtnGroup[1], 60);
    lv_obj_set_x(ui_BtnGroup[1], 100);
    lv_obj_set_y(ui_BtnGroup[1], 0);
    lv_obj_set_align(ui_BtnGroup[1], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[1], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[1], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[1], 5, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[1], lv_color_hex(0x504E5F), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[1], 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Panel10 = lv_obj_create(ui_BtnGroup[1]);
    lv_obj_set_width(ui_Panel10, 12);
    lv_obj_set_height(ui_Panel10, 12);
    lv_obj_set_x(ui_Panel10, 3);
    lv_obj_set_y(ui_Panel10, -12);
    lv_obj_set_align(ui_Panel10, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_Panel10, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Panel10, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Panel10, lv_color_hex(0xFFFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Panel10, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_Panel10, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Panel11 = lv_obj_create(ui_BtnGroup[1]);
    lv_obj_set_width(ui_Panel11, 12);
    lv_obj_set_height(ui_Panel11, 12);
    lv_obj_set_x(ui_Panel11, 3);
    lv_obj_set_y(ui_Panel11, 12);
    lv_obj_set_align(ui_Panel11, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_Panel11, LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_Panel11, 15, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_Panel11, lv_color_hex(0xFFFF00), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_Panel11, 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_Panel11, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Label27 = lv_label_create(ui_BtnGroup[1]);
    lv_obj_set_width(ui_Label27, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Label27, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Label27, -10);
    lv_obj_set_y(ui_Label27, -12);
    lv_obj_set_align(ui_Label27, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Label27, "+");
    lv_obj_set_style_text_font(ui_Label27, &lv_font_montserrat_12, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Label28 = lv_label_create(ui_BtnGroup[1]);
    lv_obj_set_width(ui_Label28, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_height(ui_Label28, LV_SIZE_CONTENT);    /// 1
    lv_obj_set_x(ui_Label28, -10);
    lv_obj_set_y(ui_Label28, 12);
    lv_obj_set_align(ui_Label28, LV_ALIGN_CENTER);
    lv_label_set_text(ui_Label28, "-");
    lv_obj_set_style_text_font(ui_Label28, &lv_font_montserrat_12, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[0], 20);
    lv_obj_set_height(ui_BtnGroup[0], 40);
    lv_obj_set_x(ui_BtnGroup[0], 70);
    lv_obj_set_y(ui_BtnGroup[0], -30);
    lv_obj_set_align(ui_BtnGroup[0], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[0], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[0], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[0], 10, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[0], lv_color_hex(0x222622), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[0], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui_BtnGroup[0], lv_color_hex(0xA69999), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui_BtnGroup[0], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_border_width(ui_BtnGroup[0], 2, LV_PART_MAIN | LV_STATE_DEFAULT);

    ui_Panel14 = lv_obj_create(ui_BtnGroup[0]);
    lv_obj_set_width(ui_Panel14, 4);
    lv_obj_set_height(ui_Panel14, 26);
    lv_obj_set_align(ui_Panel14, LV_ALIGN_CENTER);
    lv_obj_clear_flag(ui_Panel14, LV_OBJ_FLAG_SCROLLABLE);      /// Flags

    lv_obj_set_style_border_width(ui_Panel14, 0, LV_PART_SCROLLBAR | LV_STATE_DEFAULT);

    ui_TextTip = lv_textarea_create(tab);
    lv_obj_set_width(ui_TextTip, 100);
    lv_obj_set_height(ui_TextTip, 120);
    lv_obj_set_align(ui_TextTip, LV_ALIGN_CENTER);
    //lv_textarea_set_text(ui_TextTip, "DAPLINK:\nswd口\n调试");
    lv_textarea_set_placeholder_text(ui_TextTip, "查看介绍");
    lv_obj_set_style_text_font(ui_TextTip, &ui_font_FontChineseSmall, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_color(ui_TextTip, lv_color_hex(0x6577BD), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_opa(ui_TextTip, 200, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui_TextTip, 10, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_spread(ui_TextTip, 4, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_ofs_x(ui_TextTip, 0, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_ofs_y(ui_TextTip, 0, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[8], 10);
    lv_obj_set_height(ui_BtnGroup[8], 10);
    lv_obj_set_x(ui_BtnGroup[8], -100);
    lv_obj_set_y(ui_BtnGroup[8], -70);
    lv_obj_set_align(ui_BtnGroup[8], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[8], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[8], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[8], 10, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[8], lv_color_hex(0x4936C1), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[8], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_color(ui_BtnGroup[8], lv_color_hex(0x4936C1), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_opa(ui_BtnGroup[8], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui_BtnGroup[8], 20, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_spread(ui_BtnGroup[8], 4, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[5], 16);
    lv_obj_set_height(ui_BtnGroup[5], 32);
    lv_obj_set_x(ui_BtnGroup[5], -100);
    lv_obj_set_y(ui_BtnGroup[5], 70);
    lv_obj_set_align(ui_BtnGroup[5], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[5], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[5], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[5], 5, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[5], lv_color_hex(0x504E5F), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[5], 255, LV_PART_MAIN | LV_STATE_DEFAULT);

    lv_obj_set_width(ui_BtnGroup[3], 32);
    lv_obj_set_height(ui_BtnGroup[3], 16);
    lv_obj_set_x(ui_BtnGroup[3], 60);
    lv_obj_set_y(ui_BtnGroup[3], 100);
    lv_obj_set_align(ui_BtnGroup[3], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[3], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[3], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[3], 5, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[3], lv_color_hex(0x504E5F), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[3], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
    
    lv_obj_set_width(ui_BtnGroup[4], 60);
    lv_obj_set_height(ui_BtnGroup[4], 16);
    lv_obj_set_x(ui_BtnGroup[4], -50);
    lv_obj_set_y(ui_BtnGroup[4], 100);
    lv_obj_set_align(ui_BtnGroup[4], LV_ALIGN_CENTER);
    lv_obj_add_flag(ui_BtnGroup[4], LV_OBJ_FLAG_SCROLL_ON_FOCUS);     /// Flags
    lv_obj_clear_flag(ui_BtnGroup[4], LV_OBJ_FLAG_SCROLLABLE);      /// Flags
    lv_obj_set_style_radius(ui_BtnGroup[4], 5, LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_BtnGroup[4], lv_color_hex(0x35343D), LV_PART_MAIN | LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui_BtnGroup[4], 255, LV_PART_MAIN | LV_STATE_DEFAULT);
}

static lv_obj_t *ui_LabelName;
static lv_obj_t *ui_LabelNameVer;
static lv_obj_t *ui_LabelSN;
static lv_obj_t *ui_LabelBuild;
static lv_obj_t *ui_LabelCopyright;
static lv_obj_t *ui_LabelQQ;

void about_tab1_screen_create(lv_obj_t *tab)
{
    char str[32];
    ui_LabelName = lv_label_create(tab);
    lv_obj_set_width( ui_LabelName, LV_SIZE_CONTENT);  /// 1
    lv_obj_set_height( ui_LabelName, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x( ui_LabelName, -25 );
    lv_obj_set_y( ui_LabelName, -70 );
    lv_obj_set_align( ui_LabelName, LV_ALIGN_CENTER );
    lv_label_set_text(ui_LabelName,"FLPOWER");
    lv_obj_set_style_text_font(ui_LabelName, &lv_font_montserrat_22, LV_PART_MAIN| LV_STATE_DEFAULT);

    ui_LabelNameVer = lv_label_create(tab);
    lv_obj_set_width( ui_LabelNameVer, LV_SIZE_CONTENT);  /// 1
    lv_obj_set_height( ui_LabelNameVer, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x( ui_LabelNameVer, 165 );
    lv_obj_set_y( ui_LabelNameVer, -70 );
    lv_obj_set_align( ui_LabelNameVer, LV_ALIGN_LEFT_MID );
    lv_label_set_text(ui_LabelNameVer,"  V3  ");
    lv_obj_set_style_text_font(ui_LabelNameVer, &lv_font_montserrat_12, LV_PART_MAIN| LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui_LabelNameVer, 8, LV_PART_MAIN| LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_LabelNameVer, lv_color_hex(0x2F4F2F), LV_PART_MAIN | LV_STATE_DEFAULT );
    lv_obj_set_style_bg_opa(ui_LabelNameVer, 255, LV_PART_MAIN| LV_STATE_DEFAULT);

    hex_arr_to_str(str, app_dev.mc_id, 6);
    ui_LabelSN = lv_label_create(tab);
    lv_obj_set_width( ui_LabelSN, LV_SIZE_CONTENT);  /// 1
    lv_obj_set_height( ui_LabelSN, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_align( ui_LabelSN, LV_ALIGN_CENTER );
    lv_label_set_text(ui_LabelSN, str);
    lv_obj_set_style_text_font(ui_LabelSN, &lv_font_montserrat_12, LV_PART_MAIN| LV_STATE_DEFAULT);

    ui_LabelBuild = lv_label_create(tab);
    lv_obj_set_width( ui_LabelBuild, LV_SIZE_CONTENT);  /// 1
    lv_obj_set_height( ui_LabelBuild, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x( ui_LabelBuild, 0 );
    lv_obj_set_y( ui_LabelBuild, -20 );
    lv_obj_set_align( ui_LabelBuild, LV_ALIGN_CENTER );
    lv_label_set_text(ui_LabelBuild,"Build:"BUILD_VERSION);
    lv_obj_set_style_text_font(ui_LabelBuild, &lv_font_montserrat_12, LV_PART_MAIN| LV_STATE_DEFAULT);

    ui_LabelCopyright = lv_label_create(tab);
    lv_obj_set_width( ui_LabelCopyright, LV_SIZE_CONTENT);  /// 1
    lv_obj_set_height( ui_LabelCopyright, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x( ui_LabelCopyright, 0 );
    lv_obj_set_y( ui_LabelCopyright, 85 );
    lv_obj_set_align( ui_LabelCopyright, LV_ALIGN_CENTER );
    lv_label_set_text(ui_LabelCopyright,"Copyright(C) FLYN");
    lv_obj_set_style_text_font(ui_LabelCopyright, &lv_font_montserrat_12, LV_PART_MAIN| LV_STATE_DEFAULT);

    ui_LabelQQ = lv_label_create(tab);
    lv_obj_set_width( ui_LabelQQ, LV_SIZE_CONTENT);  /// 1
    lv_obj_set_height( ui_LabelQQ, LV_SIZE_CONTENT);   /// 1
    lv_obj_set_x( ui_LabelQQ, 0 );
    lv_obj_set_y( ui_LabelQQ, 20 );
    lv_obj_set_align( ui_LabelQQ, LV_ALIGN_CENTER );
    lv_label_set_text(ui_LabelQQ,"  QQ:897342204  ");
    lv_obj_set_style_text_font(ui_LabelQQ, &lv_font_montserrat_12, LV_PART_MAIN| LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui_LabelQQ, 8, LV_PART_MAIN| LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui_LabelQQ, lv_color_hex(0x1C65A3), LV_PART_MAIN | LV_STATE_DEFAULT );
    lv_obj_set_style_bg_opa(ui_LabelQQ, 255, LV_PART_MAIN| LV_STATE_DEFAULT);

}

void about_group_select(uint8_t id)
{
    uint8_t i;
    switch(id){ //update group
    case 0:   
        for(i=0;i!=BTN_NUM;i++) {
            lv_group_add_obj(g_encoder, ui_BtnGroup[i]);
        }
        lv_group_focus_obj(ui_BtnGroup[0]);
        break;
    case 1:  
        break;
    }
}

const char *tips[] = {
    "TYPE-C:\n连接PC通讯和升级固件",
    "XT30:\n电源输出",
    "TYPE-C:\nCC表功能输出, 注意电压",
    "按键:\n单击切换页面\n长按返回主界面",
    "波轮:\n左右选择\n按下进入App|编辑控件",
    "按键:\n数控电源启动关闭",
    "XT30:\n电源输入",
    "TYPE-C:\nCC表功能输入",
    "LED:\n蓝色运行\n红色DAPLINK指示",
    "GH-4P:\nDAPLINK接口",
    "GH-4P:\n串口",
};

static void about_click(lv_event_t *e)
{
    uint8_t id = lv_obj_get_index(e->current_target);
    if(id<BTN_NUM) {
        lv_textarea_set_text(ui_TextTip, tips[id]);  
    }
}
